/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package py.com.peluq.model.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Diego_M
 */
@Embeddable
public class PlanillaPagoDetPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "ci_emp", nullable = false)
    private int ciEmp;
    @Basic(optional = false)
    @NotNull
    @Column(name = "idcargo", nullable = false)
    private int idcargo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "idcontrato", nullable = false)
    private int idcontrato;
    @Basic(optional = false)
    @NotNull
    @Column(name = "idplanilla_pago", nullable = false)
    private int idplanillaPago;
    @Basic(optional = false)
    @NotNull
    @Column(name = "planilla_pago_fecha", nullable = false)
    @Temporal(TemporalType.DATE)
    private Date planillaPagoFecha;

    public PlanillaPagoDetPK() {
    }

    public PlanillaPagoDetPK(int ciEmp, int idcargo, int idcontrato, int idplanillaPago, Date planillaPagoFecha) {
        this.ciEmp = ciEmp;
        this.idcargo = idcargo;
        this.idcontrato = idcontrato;
        this.idplanillaPago = idplanillaPago;
        this.planillaPagoFecha = planillaPagoFecha;
    }

    public int getCiEmp() {
        return ciEmp;
    }

    public void setCiEmp(int ciEmp) {
        this.ciEmp = ciEmp;
    }

    public int getIdcargo() {
        return idcargo;
    }

    public void setIdcargo(int idcargo) {
        this.idcargo = idcargo;
    }

    public int getIdcontrato() {
        return idcontrato;
    }

    public void setIdcontrato(int idcontrato) {
        this.idcontrato = idcontrato;
    }

    public int getIdplanillaPago() {
        return idplanillaPago;
    }

    public void setIdplanillaPago(int idplanillaPago) {
        this.idplanillaPago = idplanillaPago;
    }

    public Date getPlanillaPagoFecha() {
        return planillaPagoFecha;
    }

    public void setPlanillaPagoFecha(Date planillaPagoFecha) {
        this.planillaPagoFecha = planillaPagoFecha;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) ciEmp;
        hash += (int) idcargo;
        hash += (int) idcontrato;
        hash += (int) idplanillaPago;
        hash += (planillaPagoFecha != null ? planillaPagoFecha.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PlanillaPagoDetPK)) {
            return false;
        }
        PlanillaPagoDetPK other = (PlanillaPagoDetPK) object;
        if (this.ciEmp != other.ciEmp) {
            return false;
        }
        if (this.idcargo != other.idcargo) {
            return false;
        }
        if (this.idcontrato != other.idcontrato) {
            return false;
        }
        if (this.idplanillaPago != other.idplanillaPago) {
            return false;
        }
        if ((this.planillaPagoFecha == null && other.planillaPagoFecha != null) || (this.planillaPagoFecha != null && !this.planillaPagoFecha.equals(other.planillaPagoFecha))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "py.com.peluq.model.entity.PlanillaPagoDetPK[ ciEmp=" + ciEmp + ", idcargo=" + idcargo + ", idcontrato=" + idcontrato + ", idplanillaPago=" + idplanillaPago + ", planillaPagoFecha=" + planillaPagoFecha + " ]";
    }
    
}
